﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Site.Models.CLAN>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Liste de clans
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Liste de clans</h2>

<table>
    <tr>
        <th></th>
        <th>
            Nom du clan
        </th>
        <th>
            Lien du forum
        </th>
        <th>
            Nombre de membres
        </th>
        <th>
            Date de création
        </th>
        <th></th>
    </tr>

<% foreach (var item in Model)
   {
       if (item.CLAN_DELETEDATE == null)
       {       
%>
    <tr>
        <td>
            <% if (item.CLAN_LOGOURL != null) { %>
            <img src="<%: Html.DisplayFor(modelItem => item.CLAN_LOGOURL)%>" title="<%: Html.DisplayFor(modelItem => item.CLAN_NAME)%>" />
            <% } %>
        </td>
        <td>
            <%: Html.ActionLink(item.CLAN_NAME, "Details", new { id = item.CLAN_ID })%>
        </td>
        <td>
            <% if (item.CLAN_FORUMLINK != null) { %>
            <a href="<%: Html.DisplayFor(modelItem => item.CLAN_FORUMLINK)%>">forum</a>
            <% } %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.CLAN_MEMBER_COUNT)%>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.CLAN_CREATIONDATE)%>
        </td>
    </tr>
<% 
   }
}%>

</table>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="alerts" runat="server">
</asp:Content>
